﻿/************************************************************************************************\
*
* This file is part of EMV Cardreader, a software Mastercard/VISA
* CAP/DPA implementation - https://code.google.com/p/emv-cardreader-sec
* For Brevity, EMV Cardreader (the software & all source code) shall
* herein be referred to simply as 'EMVcr'
*
* Copyright 2011 by 'Olipro'
*
* This particular file is subject to a specific exception; it contains code
* licensed under the Code Project Open License (http://www.codeproject.com/info/cpol10.aspx)
* and therefore is exempt from any other incompatible licensing requirements
* You may use this individual file in any manner that is compatible with the CPOL.
*
* EMVcr is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EMVcr.  If not, see <http://www.gnu.org/licenses/>.
*
\************************************************************************************************/
using System;

namespace GemCard
{
    /// <summary>
    ///  Smart card exceptions
    /// </summary>
    public class SmartCardException : Exception
    {

        public SmartCardException()
            : base("Smart card exception")
        {
        }

        public SmartCardException(string Message)
            : base(Message)
        {
        }
    }


    public class ApduCommandException : Exception
    {
        public const string
            NotValidDocument = "The file is not a valid APDU command document",
            NoSuchCommand = "No such APDU command in the document",
            ParamLeFormat = "Le parameter format is not correct",
            ParamP3Format = "P3 parameter format is not correct",
            NoSuchSequence = "No such APDU sequence in the document",
            MissingApduOrCommand = "An Apdu or a Sequence is missing in this Sequence";

        public ApduCommandException()
            : base("APDU command exception")
        {
        }

        public ApduCommandException(string Message)
            : base(Message)
        {
        }

    }
}
